﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Takkou
{
	public partial class MainPage : UserControl
	{
		public MainPage()
		{
			// Required to initialize variables
			InitializeComponent();
            m1.Click += new System.Windows.RoutedEventHandler(MissionClick);
		}

        private void MissionClick(object sender, System.Windows.RoutedEventArgs e)
		{
            Core.Mission mission = null;
            if (sender == m1)
            {
                mission = new Core.Mission("mission1.xml");
            }
            PageSwitcher ps = this.Parent as PageSwitcher;
            ps.Navigate(new GameScreen(mission));
        }
	}
}